<?php
namespace app\common\model;

class PushChannel extends Base
{
    protected $table = 'push_channels';
    
    public function getCreateTimeLabelAttr($value, $data)
    {
        if (!isset($data['create_time']) ||empty($data['create_time'])) {
            return '';
        }
        
        return date('Y-m-d H:i:s', $data['create_time']);
    }

    public function getUrlTypeLabelAttr($value, $data)
    {
        switch ($data['url_type']) {

            case 'master':
                $result = '正式';
                break;
            default :
                $result = '测试';
                break;
        }

        return $result;
    }
}